<template>
    <div>
        <h1>显示</h1>
        <table class="table table-bordered">
            <tr>
                <td>姓名</td>
                <td>联系方式</td>
                <td>籍贯</td>
                <td>开始时间</td>
                <td>结束时间</td>
                <td>地址</td>
            </tr>
            <tr v-for="item in data.list" :key="item.id">
                <td>{{ item.name }}</td>
                <td>{{ item.phone }}</td>
                <td>{{ item.email }}</td>
                <td>{{ item.createTime.substring(0,7) }}</td>
                <td>{{ item.updateTime.substring(0,7) }}</td>
                <td>{{ item.addres }}</td>
            </tr>
        </table>
    </div>
</template>

<script setup lang="ts">

import axios from 'axios';
import {reactive,ref,onMounted} from 'vue'
import {useRoute,useRouter} from 'vue-router'
let quinfor=reactive({
    "name": "",
    "phone": "",
    "email": "",
    "createTime": "",
    "updateTime": "",
    "addres": "",
});
onMounted(()=>{
show();
})
let data:any=reactive({
    list:[]
})
const show=()=>{
    axios({
        url:'https://localhost:7080/api/Hui/Show',
        method:'get',
        params:quinfor,
    })
    .then((res)=>{
        console.log(res);
        data.list=res.data;
    })
    .catch((err)=>{
        console.log(err);
    })
}
</script>

<style scoped>

</style>